package com.pwx.student.common;

public enum ResponseCode {
    // 设置常量名称为SUCCESS 绑定2个数据 1 success
    SUCCESS(1,"成功"),
    FAIL(0,"失败"),
    IS_LOGIN(2,"登录了"),
    IS_NOT_LOGIN(3,"未登录");
    // code 让常量绑定int数据
    private int code;
    // comment 让常量绑定字符串的数据
    private String comment;
    //使用构造方法给常量进行设置
    ResponseCode(int code, String comment) {
        this.code = code;
        this.comment = comment;
    }
    ResponseCode() {
    }
    /* 注意只需要get不需要set */
    public int getCode() {
        return code;
    }
    public String getComment() {
        return comment;
    }
}
